package io.github.wanggit.antcms.server.dto;

import io.github.wanggit.antcms.server.domain.AntCatalog;
import io.github.wanggit.antcms.server.domain.AntTag;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ArticleDTO implements Serializable {

    private Long articleId;

    private String title;

    private String content;

    private List<AntTag> tags = new ArrayList<>();

    private List<AntCatalog> catalogs = new ArrayList<>();

    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public List<AntTag> getTags() {
        return tags;
    }

    protected void setTags(List<AntTag> tags) {
        this.tags = tags;
    }

    public void appendTags(List<AntTag> tags) {
        this.tags.addAll(tags);
    }

    public List<AntCatalog> getCatalogs() {
        return catalogs;
    }

    protected void setCatalogs(List<AntCatalog> catalogs) {
        this.catalogs = catalogs;
    }

    public void appendCatalogs(List<AntCatalog> catalogs) {
        this.catalogs.addAll(catalogs);
    }
}
